loader/i386/linux: Cast left shift to grub_uint32_t
authorAlec Brown <alec.r.brown@oracle.com>
Fri, 7 Feb 2025 01:47:57 +0000 (01:47 +0000)
committerFelix Zielcke <fzielcke@z-51.de>
Thu, 3 Jul 2025 16:35:51 +0000 (18:35 +0200)
commit26fcb48cc48f12816c4bbb558feb1d92d387e229
tree5612cd2151d00d7e793fe9a2257033f9970933cb
parent2a8128bf0caea108d695a829b7c7b6b18f72713c
loader/i386/linux: Cast left shift to grub_uint32_t

The Coverity complains that we might overflow into a negative value when
setting linux_params.kernel_alignment to (1 << align). We can remedy
this by casting it to grub_uint32_t.

Fixes: CID 473876
Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name loader-i386-linux-Cast-left-shift-to-grub_uint32_t.patch
grub-core/loader/i386/linux.c